import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/database/beans/employee_config.dart';
import 'package:flustars_flutter3/flustars_flutter3.dart';


EmployeeConfig $EmployeeConfigFromJson(Map<String, dynamic> json) {
  final EmployeeConfig employeeConfig = EmployeeConfig();
  final String? key = jsonConvert.convert<String>(json['key']);
  if (key != null) {
    employeeConfig.key = key;
  }
  final bool? open = jsonConvert.convert<bool>(json['open']);
  if (open != null) {
    employeeConfig.open = open;
  }
  final bool? pos = jsonConvert.convert<bool>(json['pos']);
  if (pos != null) {
    employeeConfig.pos = pos;
  }
  final bool? xcx = jsonConvert.convert<bool>(json['xcx']);
  if (xcx != null) {
    employeeConfig.xcx = xcx;
  }
  return employeeConfig;
}

Map<String, dynamic> $EmployeeConfigToJson(EmployeeConfig entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['key'] = entity.key;
  data['open'] = entity.open;
  data['pos'] = entity.pos;
  data['xcx'] = entity.xcx;
  return data;
}

extension EmployeeConfigExtension on EmployeeConfig {
  EmployeeConfig copyWith({
    String? key,
    bool? open,
    bool? pos,
    bool? xcx,
  }) {
    return EmployeeConfig()
      ..key = key ?? this.key
      ..open = open ?? this.open
      ..pos = pos ?? this.pos
      ..xcx = xcx ?? this.xcx;
  }
}